@T-NT said in Is there a way to read the battery capacity from the Power Dock from the command line?:
] usb usb1-port1: connect-debounce failed
So been sniffing about power-dock and see it is writing to a GPIO 19 ?
writev(1, [{iov_base="", iov_len=0}, {iov_base="> Enabling Battery Indicator LED"..., iov_len=34}], 2> Enabling Battery Indicator LEDs
) = 34
open("/sys/class/gpio/gpio19/value", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/sys/class/gpio/export", O_WRONLY|O_LARGEFILE) = 3
write(3, "19\n", 3) = 3
close(3) = 0
open("/sys/class/gpio/gpio19/direction", O_WRONLY|O_LARGEFILE) = 3
write(3, "low\0", 4) = 4
close(3) = 0
open("/sys/class/gpio/unexport", O_WRONLY|O_LARGEFILE) = 3
write(3, "19\n", 3) = 3
close(3) = 0
nanosleep({tv_sec=0, tv_nsec=200000000}, 0x7fe47e50) = 0
open("/sys/class/gpio/gpio19/value", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/sys/class/gpio/export", O_WRONLY|O_LARGEFILE) = 3
write(3, "19\n", 3) = 3
close(3) = 0
open("/sys/class/gpio/gpio19/direction", O_WRONLY|O_LARGEFILE) = 3
write(3, "high\0", 5) = 5
close(3) = 0
open("/sys/class/gpio/unexport", O_WRONLY|O_LARGEFILE) = 3
write(3, "19\n", 3) = 3
close(3) = 0
nanosleep({tv_sec=0, tv_nsec=100000000}, 0x7fe47e50) = 0
open("/sys/class/gpio/gpio19/value", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/sys/class/gpio/export", O_WRONLY|O_LARGEFILE) = 3
write(3, "19\n", 3) = 3
close(3) = 0
open("/sys/class/gpio/gpio19/direction", O_WRONLY|O_LARGEFILE) = 3
write(3, "low\0", 4) = 4
close(3) = 0
open("/sys/class/gpio/unexport", O_WRONLY|O_LARGEFILE) = 3
write(3, "19\n", 3) = 3
close(3) = 0
exit_group(0) = ?
+++ exited with 0 +++
Do we read from a GPIO pin for a battery level or something?